//
//  AppDelegate.m
//  DiningCar-Business
//
//  Created by 吕晶 on 2020/4/7.
//  Copyright © 2020 吕晶. All rights reserved.
//

#import "AppDelegate.h"
#import "LoginVC.h"

@interface AppDelegate ()

@end

@implementation AppDelegate


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
//    if ([User isLogin]) {
        MainTabBarController *mainVC = [[MainTabBarController alloc] init];
        self.window.rootViewController = mainVC;
//    }else {
//        LoginVC *loginVC = [[LoginVC alloc] init];
//        self.window.rootViewController = loginVC;
//    }
    [self setUpKeyboard];
    [self.window makeKeyAndVisible];
    return YES;
}

- (void)setUpKeyboard {
    IQKeyboardManager *manager = [IQKeyboardManager sharedManager];
    //默认为YES，关闭为NO
    manager.enable = YES;
    //键盘弹出时，点击背景，键盘收回
    manager.shouldResignOnTouchOutside = YES;
    //如果YES，那么使用textField的tintColor属性为IQToolbar，否则颜色为黑色。默认是否定的。
    manager.shouldToolbarUsesTextFieldTintColor = YES;
    //如果YES，则在IQToolbar上添加textField的占位符文本。默认是肯定的。
    manager.shouldShowToolbarPlaceholder = YES;
    //设置IQToolbar按钮的文字
    manager.toolbarDoneBarButtonItemText = @"完成";
    //隐藏键盘上面的toolBar,默认是开启的
    manager.enableAutoToolbar = NO;
}

@end
